
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<form name="listproductscart" action="Cart.do" method="get">
	<table  width="100%" border="1" cellspacing="0" cellpadding="5">
		<tr bgcolor="#FFD700">
			<td class="bgColorMain"><strong><font
					color="#FF0000">COMPARE</font></strong></td>
		</tr>
		<tr>
			<td>
				<table width="100%"  border="1" cellspacing="0" cellpadding="5">
					<tr align="center" bgcolor="#9370DB">
						<td style ="width:10%"><strong>Compare</strong></td>
						<td style ="width:22%"><strong>${requestScope.pd1name }</strong></td>
						<td style ="width:22%"><strong>${requestScope.pd2name }</strong></td>
						<c:if test ="${requestScope.pd3name != null}" >
						<td style ="width:22%" ><strong>${requestScope.pd3name }</strong></td>
						</c:if>
						<c:if test ="${requestScope.pd4name != null}" >
						<td style ="width:22%"><strong>${requestScope.pd4name }</strong></td>
						</c:if>
					</tr>
					
					<tr>
						<td style="text-align: center">Image</td>
						<td style ="text-align:center"><image style ="width:100px;height:100px" src ="<c:url value="${requestScope.img1 }" />"/></td>
						<td style ="text-align:center"><image style ="width:100px;height:100px" src ="<c:url value="${requestScope.img2 }" />"/></td>
						<c:if test ="${requestScope.pd3name!=null}">
						<td style ="text-align:center"><image style ="width:100px;height:100px" src ="<c:url value="${requestScope.img3 }" />"/></td>
						</c:if>
						<c:if test ="${requestScope.pd4name != null}">
						<td style ="text-align:center"><image style ="width:100px;height:100px" src ="<c:url value="${requestScope.img4 }" />"/></td>
						</c:if>
					</tr>
					<!-- Rating -->
					<tr>
						<td style="text-align: center">Rating</td>
						<td style ="text-align:center"> 
							<div class="rating_area_compare">
								<c:forEach var="j" begin="1" end="5" >   
									<input type="radio" name="rating_product${requestScope.pd1.productid }" value="${j }" class="star" disabled="disabled"
										<c:if test="${requestScope.pd1.rating == j  }">
											checked ="checked"
										</c:if>
									>
								</c:forEach>
					        </div>
						
						</td>
						<td style ="text-align:center">
						
							<div class="rating_area_compare">
								<c:forEach var="j" begin="1" end="5" >   
									<input type="radio" name="rating_product${requestScope.pd2.productid }" value="${j }" class="star" disabled="disabled"
										<c:if test="${requestScope.pd2.rating == j  }">
											checked ="checked"
										</c:if>
									>
								</c:forEach>
					        </div>
						</td>
						<c:if test ="${requestScope.pd3name!=null}">
						<td style ="text-align:center">
							<div class="rating_area_compare">
								<c:forEach var="j" begin="1" end="5" >   
									<input type="radio" name="rating_product${requestScope.pd3.productid }" value="${j }" class="star" disabled="disabled"
										<c:if test="${requestScope.pd3.rating == j  }">
											checked ="checked"
										</c:if>
									>
								</c:forEach>
					        </div>
						</td>
						</c:if>
						<c:if test ="${requestScope.pd4name != null}">
						<td style ="text-align:center">
							<div class="rating_area_compare">
								<c:forEach var="j" begin="1" end="5" >   
									<input type="radio" name="rating_product${requestScope.pd4.productid }" value="${j }" class="star" disabled="disabled"
										<c:if test="${requestScope.pd4.rating == j  }">
											checked ="checked"
										</c:if>
									>
								</c:forEach>
					        </div>
						</td>
						</c:if>
					</tr>
					
					<c:if test ="${requestScope.sizeproduct==4}">
					<c:forEach var ="i" begin ="0" end = "${requestScope.row1.size()-1}">
					<tr valign="top">
						<td align="center">${requestScope.row1[i]}</td>
						<td align="center">${requestScope.row2[i]}</td>
						<td align="center">${requestScope.row3[i]}</td>
						<td align="center">${requestScope.row4[i]}</td>
						<td align="center">${requestScope.row5[i]}</td>
					</tr>
					</c:forEach>
					</c:if>
					<c:if test ="${requestScope.sizeproduct==3}">
					<c:forEach var ="i" begin ="0" end = "${requestScope.row1.size()-1}">
					<tr valign="top">
						<td align="center">${requestScope.row1[i]}</td>
						<td align="center">${requestScope.row2[i]}</td>
						<td align="center">${requestScope.row3[i]}</td>
						<td align="center">${requestScope.row4[i]}</td>
					</tr>
					</c:forEach>
					</c:if>
					<c:if test ="${requestScope.sizeproduct==2}">
					<c:forEach var ="i" begin ="0" end = "${requestScope.row1.size()-1}">
					<tr valign="top">
						<td align="center">${requestScope.row1[i]}</td>
						<td align="center">${requestScope.row2[i]}</td>
						<td align="center">${requestScope.row3[i]}</td>
					</tr>
					</c:forEach>
					</c:if>
				</table> <br />
			</td>
		</tr>
	</table>
	
</form>
